<?php
namespace Nawa\MedicalStudy\MedicalCenter\Monitoring;
/**
 * Monitoring Available Surveys
 *
 * It represant a link between a survey and the monitorings
 *
 * @author Xavier VILAIN
 * @package Nawa\MedicalStudy\MedicalCenter\Monitoring
 *
 * @property int	$surveyid	Id
 * @property int	$active		Active ?
 * @property int 	$standard	Standard ?
 */
class Type extends \Fox\Object {
	
	/**
	 * Link to the survey object
	 * @var string
	 */
	const LINK_SURVEY = 'survey';
	
	/**
	 * Reverve Link to the monitoring available survey object
	 * @var string
	 */
	const LINK_MONITORING_TYPE = 'monitoringSurvey';
}
\Fox\Dao::infos(Type::className(),
new \Fox\Object\Info('ms_mc_monitoring_types', \Fox\Databases::DB_APP)
);

// Link to Partners attached to the Medical Center Partner
\Fox\Object\Links::add(\Fox\Dao::link(\Nawa\Survey::className(),Type::LINK_MONITORING_TYPE)
->to(Type::className(),Type::LINK_SURVEY)
->on('surveyid')
->oneToOne()
);